I stumbled across R projects when I was trying (and failing) to keep scripts in separate project directories organized AND accessible on multiple machines.
In my early days I was no stranger to having this at the top of each script:
setwd('path/that/only/ever/works/on/one/machine')
And while setwd() served it’s purpose I often ended up frustrated when trying to change from project A to project B or working on my personal computer. And not to mention the impossibility of easily sharing code with this structure.
R Projects allows you to keep all files associated with a single project together – input data, R scripts, figures, etc. Likely you already have project specific folders to keep track of your work. R Projects fits right into this workflow.
Creating a new project is simple and RStudio provides a walkthrough for this.
Here’s a real-time video of how to create a new R Project yourself: